3.247 \(\int \frac{\sqrt{-c+d x} \sqrt{c+d x} \left (a+b x^2\right )}{x^2} \, dx\)

Optimal. Leaf size=104 \[ \frac{1}{2} x \sqrt{d x-c} \sqrt{c+d x} \left (b-\frac{2 a d^2}{c^2}\right )-\frac{\left (b c^2-2 a d^2\right ) \tanh ^{-1}\left (\frac{\sqrt{d x-c}}{\sqrt{c+d x}}\right )}{d}+\frac{a (d x-c)^{3/2} (c+d x)^{3/2}}{c^2 x} \]

[Out]

((b - (2*a*d^2)/c^2)*x*Sqrt[-c + d*x]*Sqrt[c + d*x])/2 + (a*(-c + d*x)^(3/2)*(c
+ d*x)^(3/2))/(c^2*x) - ((b*c^2 - 2*a*d^2)*ArcTanh[Sqrt[-c + d*x]/Sqrt[c + d*x]]
)/d

_______________________________________________________________________________________

Rubi [A]  time = 0.255858, antiderivative size = 104, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.129 \[ \frac{1}{2} x \sqrt{d x-c} \sqrt{c+d x} \left (b-\frac{2 a d^2}{c^2}\right )-\frac{\left (b c^2-2 a d^2\right ) \tanh ^{-1}\left (\frac{\sqrt{d x-c}}{\sqrt{c+d x}}\right )}{d}+\frac{a (d x-c)^{3/2} (c+d x)^{3/2}}{c^2 x} \]

Antiderivative was successfully verified.

[In]  Int[(Sqrt[-c + d*x]*Sqrt[c + d*x]*(a + b*x^2))/x^2,x]

[Out]

((b - (2*a*d^2)/c^2)*x*Sqrt[-c + d*x]*Sqrt[c + d*x])/2 + (a*(-c + d*x)^(3/2)*(c
+ d*x)^(3/2))/(c^2*x) - ((b*c^2 - 2*a*d^2)*ArcTanh[Sqrt[-c + d*x]/Sqrt[c + d*x]]
)/d

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 16.7444, size = 90, normalized size = 0.87 \[ \frac{a \left (- c + d x\right )^{\frac{3}{2}} \left (c + d x\right )^{\frac{3}{2}}}{c^{2} x} + \frac{\left (2 a d^{2} - b c^{2}\right ) \operatorname{atanh}{\left (\frac{\sqrt{c + d x}}{\sqrt{- c + d x}} \right )}}{d} - \frac{x \sqrt{- c + d x} \sqrt{c + d x} \left (2 a d^{2} - b c^{2}\right )}{2 c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((b*x**2+a)*(d*x-c)**(1/2)*(d*x+c)**(1/2)/x**2,x)

[Out]

a*(-c + d*x)**(3/2)*(c + d*x)**(3/2)/(c**2*x) + (2*a*d**2 - b*c**2)*atanh(sqrt(c
 + d*x)/sqrt(-c + d*x))/d - x*sqrt(-c + d*x)*sqrt(c + d*x)*(2*a*d**2 - b*c**2)/(
2*c**2)

_______________________________________________________________________________________

Mathematica [A]  time = 0.107133, size = 81, normalized size = 0.78 \[ \frac{\left (2 a d^2-b c^2\right ) \log \left (\sqrt{d x-c} \sqrt{c+d x}+d x\right )}{2 d}+\left (\frac{b x}{2}-\frac{a}{x}\right ) \sqrt{d x-c} \sqrt{c+d x} \]

Antiderivative was successfully verified.

[In]  Integrate[(Sqrt[-c + d*x]*Sqrt[c + d*x]*(a + b*x^2))/x^2,x]

[Out]

(-(a/x) + (b*x)/2)*Sqrt[-c + d*x]*Sqrt[c + d*x] + ((-(b*c^2) + 2*a*d^2)*Log[d*x
+ Sqrt[-c + d*x]*Sqrt[c + d*x]])/(2*d)

_______________________________________________________________________________________

Maple [C]  time = 0.021, size = 153, normalized size = 1.5 \[{\frac{{\it csgn} \left ( d \right ) }{2\,dx}\sqrt{dx-c}\sqrt{dx+c} \left ({\it csgn} \left ( d \right ){x}^{2}bd\sqrt{{d}^{2}{x}^{2}-{c}^{2}}+2\,\ln \left ( \left ({\it csgn} \left ( d \right ) \sqrt{{d}^{2}{x}^{2}-{c}^{2}}+dx \right ){\it csgn} \left ( d \right ) \right ) xa{d}^{2}-\ln \left ( \left ({\it csgn} \left ( d \right ) \sqrt{{d}^{2}{x}^{2}-{c}^{2}}+dx \right ){\it csgn} \left ( d \right ) \right ) xb{c}^{2}-2\,a\sqrt{{d}^{2}{x}^{2}-{c}^{2}}{\it csgn} \left ( d \right ) d \right ){\frac{1}{\sqrt{{d}^{2}{x}^{2}-{c}^{2}}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((b*x^2+a)*(d*x-c)^(1/2)*(d*x+c)^(1/2)/x^2,x)

[Out]

1/2*(d*x-c)^(1/2)*(d*x+c)^(1/2)*(csgn(d)*x^2*b*d*(d^2*x^2-c^2)^(1/2)+2*ln((csgn(
d)*(d^2*x^2-c^2)^(1/2)+d*x)*csgn(d))*x*a*d^2-ln((csgn(d)*(d^2*x^2-c^2)^(1/2)+d*x
)*csgn(d))*x*b*c^2-2*a*(d^2*x^2-c^2)^(1/2)*csgn(d)*d)*csgn(d)/(d^2*x^2-c^2)^(1/2
)/d/x

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^2 + a)*sqrt(d*x + c)*sqrt(d*x - c)/x^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.241695, size = 379, normalized size = 3.64 \[ -\frac{4 \, b d^{5} x^{6} - 5 \, b c^{2} d^{3} x^{4} - 2 \, a c^{4} d +{\left (b c^{4} d + 4 \, a c^{2} d^{3}\right )} x^{2} -{\left (4 \, b d^{4} x^{5} - 3 \, b c^{2} d^{2} x^{3} + 4 \, a c^{2} d^{2} x\right )} \sqrt{d x + c} \sqrt{d x - c} -{\left (4 \,{\left (b c^{2} d^{3} - 2 \, a d^{5}\right )} x^{4} - 3 \,{\left (b c^{4} d - 2 \, a c^{2} d^{3}\right )} x^{2} -{\left (4 \,{\left (b c^{2} d^{2} - 2 \, a d^{4}\right )} x^{3} -{\left (b c^{4} - 2 \, a c^{2} d^{2}\right )} x\right )} \sqrt{d x + c} \sqrt{d x - c}\right )} \log \left (-d x + \sqrt{d x + c} \sqrt{d x - c}\right )}{2 \,{\left (4 \, d^{4} x^{4} - 3 \, c^{2} d^{2} x^{2} -{\left (4 \, d^{3} x^{3} - c^{2} d x\right )} \sqrt{d x + c} \sqrt{d x - c}\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^2 + a)*sqrt(d*x + c)*sqrt(d*x - c)/x^2,x, algorithm="fricas")

[Out]

-1/2*(4*b*d^5*x^6 - 5*b*c^2*d^3*x^4 - 2*a*c^4*d + (b*c^4*d + 4*a*c^2*d^3)*x^2 -
(4*b*d^4*x^5 - 3*b*c^2*d^2*x^3 + 4*a*c^2*d^2*x)*sqrt(d*x + c)*sqrt(d*x - c) - (4
*(b*c^2*d^3 - 2*a*d^5)*x^4 - 3*(b*c^4*d - 2*a*c^2*d^3)*x^2 - (4*(b*c^2*d^2 - 2*a
*d^4)*x^3 - (b*c^4 - 2*a*c^2*d^2)*x)*sqrt(d*x + c)*sqrt(d*x - c))*log(-d*x + sqr
t(d*x + c)*sqrt(d*x - c)))/(4*d^4*x^4 - 3*c^2*d^2*x^2 - (4*d^3*x^3 - c^2*d*x)*sq
rt(d*x + c)*sqrt(d*x - c))

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{\left (a + b x^{2}\right ) \sqrt{- c + d x} \sqrt{c + d x}}{x^{2}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x**2+a)*(d*x-c)**(1/2)*(d*x+c)**(1/2)/x**2,x)

[Out]

Integral((a + b*x**2)*sqrt(-c + d*x)*sqrt(c + d*x)/x**2, x)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.230448, size = 149, normalized size = 1.43 \[ -\frac{\frac{6144 \, a c^{2} d^{2}}{{\left (\sqrt{d x + c} - \sqrt{d x - c}\right )}^{4} + 4 \, c^{2}} - 2 \,{\left ({\left (d x + c\right )} b - b c\right )} \sqrt{d x + c} \sqrt{d x - c} -{\left (b c^{2} - 2 \, a d^{2}\right )}{\rm ln}\left ({\left (\sqrt{d x + c} - \sqrt{d x - c}\right )}^{4}\right )}{768 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^2 + a)*sqrt(d*x + c)*sqrt(d*x - c)/x^2,x, algorithm="giac")

[Out]

-1/768*(6144*a*c^2*d^2/((sqrt(d*x + c) - sqrt(d*x - c))^4 + 4*c^2) - 2*((d*x + c
)*b - b*c)*sqrt(d*x + c)*sqrt(d*x - c) - (b*c^2 - 2*a*d^2)*ln((sqrt(d*x + c) - s
qrt(d*x - c))^4))/d